Validate actual rule object instead of Field#type for @Rule#1721
Validate actual rule object instead of Field#type for @Rule#1721vlsi wants to merge 1 commit intojunit-team:mainfrom
Conversation
|
JUnit 4 is now in maintenance mode. At this point, only critical bugs and security issues will be fixed. The team has therefore decided to close this PR. |
|
@junit-builds , can you please reconsider? The issue blocks Testcontainers from dropping It is extremely annoying that What is your suggestion for testcontainers/testcontainers-java#970 then? |
Multiple suggestions were made in #1720 I think the best approach would be to split testcontainers into multiple libraries, one with the "core" code, and one for each test library that testcontainers supports (see #1720 (comment)) |
| */ | ||
| private static final class FieldMustBeARule implements RuleValidator { | ||
| public void validate(FrameworkMember<?> member, Class<? extends Annotation> annotation, List<Throwable> errors) { | ||
| if (true) { |
There was a problem hiding this comment.
if (true) {
// Comentario explicativo
return;
}
// Esta validación nunca se ejecuta
if (!isRuleType(member)) {
errors.add(new ValidationError(member, annotation,
"must implement MethodRule or TestRule."));
}
fixes #1720